From 35238c4fc020baccc1de24b38fe7b69e97e22c69 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 14 Jul 2022 14:02:27 +0200 Subject: [PATCH] Pacify -Wunused-macros in --without-all builds * src/image.c (IMAGE_TYPE_INIT): Make conditional on image support. --- src/image.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/image.c b/src/image.c index aa7bb3ba667..cc6f27612b9 100644 --- a/src/image.c +++ b/src/image.c @@ -1071,9 +1071,16 @@ struct image_type libraries on Windows), or NULL if none. */ bool (*init) (void); /* An initializer for the init field. */ -# define IMAGE_TYPE_INIT(f) f -#else -# define IMAGE_TYPE_INIT(f) +#endif +#if defined HAVE_RSVG || defined HAVE_PNG || defined HAVE_GIF || \ + defined HAVE_TIFF || defined HAVE_JPEG || defined HAVE_XPM || \ + defined HAVE_NS || defined HAVE_HAIKU || defined HAVE_PGTK || \ + defined HAVE_WEBP +# ifdef WINDOWSNT +# define IMAGE_TYPE_INIT(f) f +# else +# define IMAGE_TYPE_INIT(f) +# endif #endif }; -- 2.30.2